//
//  ZM_LL_List_TVCell.m
//  YYFMMall
//
//  Created by chenzm on 2019/9/23.
//  Copyright © 2019 YuYou1. All rights reserved.
//

#import "ZM_LL_List_TVCell.h"

@implementation ZM_LL_List_TVCell


#pragma mark - 赋值
-(void)setFirStr:(NSString *)firStr{
    _firStr = firStr;
    self.firLbl.text = kIsEmptyStr(firStr)?@"":firStr;
}
-(void)setSecStr:(NSString *)secStr{
    _secStr = secStr;
    self.secLbl.text = kIsEmptyStr(secStr)?@"":secStr;
}

#pragma mark - Methods


#pragma mark - Intial
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setUpBaseData];
        [self setUpUI];
    }
    return self;
}

///基本数据设置
-(void)setUpBaseData{
    
}
///添加控件
-(void)setUpUI{
    [self bgV];
    [self firLbl];
    [self secLbl];
    [self lineV];
}


#pragma mark - lazyLoad
-(UILabel *)firLbl{
    if (!_firLbl) {
        _firLbl = [UILabel new];
        _firLbl.textColor = kHexColor(0x333333);
        _firLbl.font = kMediumFont(16);
        [self addSubview:_firLbl];
        [_firLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(15);
            make.right.mas_equalTo(-15);
            make.top.mas_equalTo(8);
        }];
    }
    return _firLbl;
}

-(UILabel *)secLbl{
    if (!_secLbl) {
        _secLbl = [UILabel new];
        _secLbl.textColor = kHexColor(0x999999);
        _secLbl.font = kFont(12);
        [self addSubview:_secLbl];
        [_secLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(15);
            make.right.mas_equalTo(-15);
            make.top.mas_equalTo(self.firLbl.mas_bottom).offset(8);
        }];
    }
    return _secLbl;
}



-(UIView *)lineV{
    if (!_lineV) {
        _lineV = [UIView new];
        _lineV.hidden = YES;
        _lineV.backgroundColor = kHexColor(0xEEEEEE);
        [self addSubview:_lineV];
        [_lineV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(15);
            make.right.mas_equalTo(-15);
            make.bottom.mas_equalTo(0);
            make.height.mas_equalTo(1);
        }];
    }
    return _lineV;
}
-(UIView *)bgV{
    if (!_bgV) {
        _bgV = [UIView new];
        _bgV.hidden = YES;
        _bgV.backgroundColor = kHexColor(0xFAFAFA);
        [self addSubview:_bgV];
        [_bgV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(15);
            make.right.mas_equalTo(-15);
            make.bottom.top.mas_equalTo(0);
        }];
    }
    return _bgV;
}

@end
